package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.common.pojos.article.ApArticle;
import com.heima.wemedia.service.ReportService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReportServiceMapper extends BaseMapper<ReportService> {

    /**
     * 统计点赞数量
     *
     * @param beginTime
     * @param endTime
     * @return
     */
    Integer countLikes(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);

    /**
     * 统计收藏数量
     *
     * @param beginTime
     * @param endTime
     * @return
     */
    Integer countCollect(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);


    /**
     * 统计文章数量
     *
     * @param beginTime
     * @param endTime
     * @return
     */
    Integer countpublishNum(LocalDateTime beginTime, LocalDateTime endTime);
}
